package cn.francis.chatplatform.modules;

import cn.francis.common.annoation.Limit;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 张俊辉
 */

@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping("check/health")
public class CheckHealth {

    @GetMapping
    @Limit(key = "checkHealth", permitsPerSecond = 1, timeout = 500, msg = "健康检查过快,请稍后再试")
    public void execute() {
        log.info("Health check started");
    }
}
